redraw the color button when an alpha is set.
authorJonathan Blandford <jrb@gnome.org>
Wed, 21 Jan 2004 23:29:08 +0000 (23:29 +0000)
committerJonathan Blandford <jrb@src.gnome.org>
Wed, 21 Jan 2004 23:29:08 +0000 (23:29 +0000)
Wed Jan 21 18:10:40 2004  Jonathan Blandford  <jrb@gnome.org>

        * gtk/gtkcolorbutton.c (gtk_color_button_set_color):redraw the
        color button when an alpha is set.
        (gtk_color_button_set_alpha): redraw the color button when an
        alpha is set.

ChangeLog
ChangeLog.pre-2-10
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gtk/gtkcolorbutton.c

index a74d6da328a18f0d0be30869375ab695693fbf12..78af4485c52434c3d757d979e0c875173ecb66fd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+Wed Jan 21 18:10:40 2004  Jonathan Blandford  <jrb@gnome.org>
+
+       * gtk/gtkcolorbutton.c (gtk_color_button_set_color):redraw the
+       color button when an alpha is set.
+       (gtk_color_button_set_alpha): redraw the color button when an
+       alpha is set.
+
 Wed Jan 21 23:27:14 2004  Matthias Clasen  <maclas@gmx.de>
 
        Fix #131869: 
index a74d6da328a18f0d0be30869375ab695693fbf12..78af4485c52434c3d757d979e0c875173ecb66fd 100644 (file)
@@ -1,3 +1,10 @@
+Wed Jan 21 18:10:40 2004  Jonathan Blandford  <jrb@gnome.org>
+
+       * gtk/gtkcolorbutton.c (gtk_color_button_set_color):redraw the
+       color button when an alpha is set.
+       (gtk_color_button_set_alpha): redraw the color button when an
+       alpha is set.
+
 Wed Jan 21 23:27:14 2004  Matthias Clasen  <maclas@gmx.de>
 
        Fix #131869: 
index a74d6da328a18f0d0be30869375ab695693fbf12..78af4485c52434c3d757d979e0c875173ecb66fd 100644 (file)
@@ -1,3 +1,10 @@
+Wed Jan 21 18:10:40 2004  Jonathan Blandford  <jrb@gnome.org>
+
+       * gtk/gtkcolorbutton.c (gtk_color_button_set_color):redraw the
+       color button when an alpha is set.
+       (gtk_color_button_set_alpha): redraw the color button when an
+       alpha is set.
+
 Wed Jan 21 23:27:14 2004  Matthias Clasen  <maclas@gmx.de>
 
        Fix #131869: 
index a74d6da328a18f0d0be30869375ab695693fbf12..78af4485c52434c3d757d979e0c875173ecb66fd 100644 (file)
@@ -1,3 +1,10 @@
+Wed Jan 21 18:10:40 2004  Jonathan Blandford  <jrb@gnome.org>
+
+       * gtk/gtkcolorbutton.c (gtk_color_button_set_color):redraw the
+       color button when an alpha is set.
+       (gtk_color_button_set_alpha): redraw the color button when an
+       alpha is set.
+
 Wed Jan 21 23:27:14 2004  Matthias Clasen  <maclas@gmx.de>
 
        Fix #131869: 
index a74d6da328a18f0d0be30869375ab695693fbf12..78af4485c52434c3d757d979e0c875173ecb66fd 100644 (file)
@@ -1,3 +1,10 @@
+Wed Jan 21 18:10:40 2004  Jonathan Blandford  <jrb@gnome.org>
+
+       * gtk/gtkcolorbutton.c (gtk_color_button_set_color):redraw the
+       color button when an alpha is set.
+       (gtk_color_button_set_alpha): redraw the color button when an
+       alpha is set.
+
 Wed Jan 21 23:27:14 2004  Matthias Clasen  <maclas@gmx.de>
 
        Fix #131869: 
index deef2dde52caf5674c08eb887d969cee7eb909b3..ab0e69873fa6df928f4444b9656ce25bfd687d5b 100644 (file)
@@ -784,6 +784,12 @@ gtk_color_button_set_color (GtkColorButton *color_button,
   color_button->priv->color.green = color->green;
   color_button->priv->color.blue = color->blue;
 
+  if (color_button->priv->pixbuf != NULL)
+    g_object_unref (color_button->priv->pixbuf);
+  color_button->priv->pixbuf = NULL;
+
+  gtk_widget_queue_draw (color_button->priv->drawing_area);
+  
   g_object_notify (G_OBJECT (color_button), "color");
 }
 
@@ -804,7 +810,13 @@ gtk_color_button_set_alpha (GtkColorButton *color_button,
   g_return_if_fail (GTK_IS_COLOR_BUTTON (color_button));
 
   color_button->priv->alpha = alpha;
-  
+
+  if (color_button->priv->pixbuf != NULL)
+    g_object_unref (color_button->priv->pixbuf);
+  color_button->priv->pixbuf = NULL;
+
+  gtk_widget_queue_draw (color_button->priv->drawing_area);
+
   g_object_notify (G_OBJECT (color_button), "alpha");
 }